package com.scau.hwadee.examination.service;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.PageInfo;
import com.scau.hwadee.examination.entity.Examcourse;
import com.scau.hwadee.examination.entity.Examplanapproval;
import com.scau.hwadee.examination.entity.Examsession;
import com.scau.hwadee.examination.entity.Major;

import java.util.List;
import java.util.Map;

/**
 * @author YHX
 * @date 2019/8/1 16:14
 * description
 */
public interface ExaminationPlanService {
  /**
   * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Examsession>
   * @author YHX
   * @description 获取特定状态的考次
   * @date 16:09 2019/8/4
   * @Param [pageNum, pageSize, state]
   **/
  PageInfo<Examsession> getAllPlanStateExamSession(int pageNum, int pageSize, Integer state);

  /**
   * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Major>
   * @author YHX
   * @description 根据专业计划版本和专业状态去获取专业信息
   * @date 16:09 2019/8/4
   * @Param [pageNum, pageSize, majorVersionId, state]
   **/
  PageInfo<Major> getAllMajorByMajorPlanVersionAndMajorState(int pageNum, int pageSize, String majorVersionId, String state);

  /**
   * @return int
   * @author YHX
   * @description 新增开考专业
   * @date 16:10 2019/8/4
   * @Param [jsonArray]
   **/
  int createOpeningExamMajor(JSONArray jsonArray);

  /**
   * @return int
   * @author YHX
   * @description 删除开考专业列表
   * @date 16:10 2019/8/4
   * @Param [jsonArray]
   **/
  int deleteExamMajorList(JSONArray jsonArray);

  /**
   * @return java.util.List<com.scau.hwadee.examination.entity.Examsession>
   * @author YHX
   * @description 获取没有开设课程的考次信息
   * @date 16:10 2019/8/4
   * @Param [pageNum, pageSize]
   **/
  List<Examsession> getAllExamSessionWithoutCourse(int pageNum, int pageSize);

  /**
   * @return int
   * @author YHX
   * @description 新建开考课程
   * @date 16:11 2019/8/4
   * @Param [jsonArray]
   **/
  int createExamCourses(JSONArray jsonArray);

  /**
   * @return int
   * @author YHX
   * @description 更新课程开考时间
   * @date 16:11 2019/8/4
   * @Param [jsonArray]
   **/
  int updateExamCourseTime(JSONArray jsonArray);

  /**
   * @return int
   * @author YHX
   * @description 更新考试计划
   * @date 16:11 2019/8/4
   * @Param [examplanapproval]
   **/
  int updateExamPlan(Examplanapproval examplanapproval);

  /**
   * @return java.util.List<com.scau.hwadee.examination.entity.Examcourse>
   * @author YHX
   * @description 获取考试课程统计信息
   * @date 16:12 2019/8/4
   * @Param [pageNum, pageSize, examSessionId]
   **/
  List<Examcourse> getExamCourseSummary(int pageNum, int pageSize, String examSessionId);

  /**
   * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Major>
   * @author YHX
   * @description 获取某个考次的所有专业信息
   * @date 16:12 2019/8/4
   * @Param [pageNum, pageSize, esId]
   **/
  PageInfo<Major> getMajorsByMajorIds(int pageNum, int pageSize, String esId);

  /**
   * @return com.github.pagehelper.PageInfo<java.util.Map < java.lang.String, java.lang.Object>>
   * @author YHX
   * @description 考试开考课程简表
   * @date 16:12 2019/8/4
   * @Param [pageNum, pageSize, esId]
   **/
  PageInfo<Map<String, Object>> getExamOpeningCourseSummary(int pageNum, int pageSize, String esId);

  /**
   * @return java.util.Map<java.lang.String, java.lang.Integer>
   * @author YHX
   * @description 考试课表专业课程数统计
   * @date 16:13 2019/8/4
   * @Param [esId]
   **/
  Map<String, Integer> examinationScheduleProfessionalCourseStatistics(String esId);

  /**
   * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Examsession>
   * @author YHX
   * @description 获取所有没有专业版本的考次
   * @date 15:42 2019/8/6
   * @Param [pageNum, pageSize]
   **/
  PageInfo<Examsession> getAllExamsessionWithoutMajorPlan(int pageNum, int pageSize);

  /**
   * @return int
   * @author YHX
   * @description 更新考次的信息
   * @date 15:42 2019/8/6
   * @Param [examsession]
   **/
  int updateExamsession(Examsession examsession);

  /**
   * @param pageNum  页码
   * @param pageSize 页大小
   * @param esId     考次ID
   * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Examcourse>
   * @author YHX
   * @description 根据考次获取所有的开考课程
   * @date 14:41 2019/8/7
   **/
  PageInfo<Examcourse> getAllExamCourseByExamSessionId(int pageNum, int pageSize, String esId);

  /**
   * @param jsonArray 开考课程的考次和课程主键
   * @return int
   * @author YHX
   * @description 删除开考课程
   * @date 15:19 2019/8/7
   **/
  int deleteExamCourseList(JSONArray jsonArray);

  /**
   * @param pageNum  页码
   * @param pageSize 页大小
   * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Examplanapproval>
   * @author YHX
   * @description
   * @date 14:59 2019/8/8
   **/
  PageInfo<Examplanapproval> getAllExamplanapprovals(int pageNum, int pageSize);
}
